package com.sc.nft.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum PayChannelEnum {
  SAND(1, "衫德"),
  NATIVE(2, "原生"),
  APPLE_PAY(3, "苹果内购"),
  HF_PAY(4, "汇付支付"),
  LL_PAY(5, "连连支付"),
  HNA_PAY(6, "新生支付"),
  WX_PAY(7, "微信支付"),
  ;
  @EnumValue private int code;
  private String description;


  public static String getByCode(int code) {
    for (PayChannelEnum value : values()) {
      if(value.getCode() == code){
        return value.getDescription();
      }
    }
    return null;
  }
}
